import React,{useEffect ,useState} from "react";
import { useSingleState } from "nice-hooks"

function Garzi(props){
    const [state,setState]=useSingleState({

    })

    useEffect(()=>{
        // console.log(props)
    },[])

    const recen=()=>{
        console.log("我是子组件的方法")
    }

    return(
        <div>
            我是子组件
            <p>{props.msg}</p>
            <button onClick={props.run}>点击调用父组件的方法</button>
        </div>
    )
}

export default Garzi